//
//  MainListCell.m
//  liangyi
//
//  Created by 张水 on 16/12/13.
//  Copyright © 2016年 yswh. All rights reserved.
//

#import "MainListCell.h"

@implementation MainListCell


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self setupUI];
    }
    return self;
}

- (void)setCellModel:(MainCellModel *)cellModel{
    
    _cellModel = cellModel;
    [self.DescribeImg sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@/%@",BaseIamgeUrl,cellModel.cateImg]] placeholderImage:[UIImage imageNamed:@"img_placeholder"]];
//    self.catelabel.text = cellModel.cateName;

}

- (void)setupUI{
    self.DescribeImg = [[UIImageView alloc]init];
    self.DescribeImg.contentMode = UIViewContentModeScaleToFill;
    [self.contentView addSubview:self.DescribeImg];
    [self.DescribeImg mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.left.right.bottom.equalTo(self.contentView);
    }];
    
//    self.catelabel = [[UILabel alloc]init];
//    [self.contentView addSubview:self.catelabel];
//    [self.catelabel mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.centerX.equalTo(self.contentView.mas_centerX);
//        make.centerY.equalTo(self.contentView.mas_centerY);
//    }];
//    self.catelabel.font = [UIFont systemFontOfSize:15];
//    self.catelabel.textColor= [UIColor redColor];
    
}

- (void)layoutSubviews{
    [super layoutSubviews];

}


@end
